<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CBasicService类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#friends">友元</a> &#124;
<a href="class_c_basic_service-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CBasicService类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>服务类 基类  
 <a href="class_c_basic_service.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_service_base_8h_source.html">ServiceBase.h</a>&gt;</code></p>
<div class="dynheader">
类 CBasicService 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_c_basic_service.png" usemap="#CBasicService_map" alt=""/>
  <map id="CBasicService_map" name="CBasicService_map">
<area href="class_c_ipc_base.html" title="进程间通信基类" alt="CIpcBase" shape="rect" coords="53,56,149,80"/>
<area href="class_c_tcp_base.html" alt="CTcpBase" shape="rect" coords="265,56,361,80"/>
<area href="class_c_udp_base.html" alt="CUdpBase" shape="rect" coords="477,56,573,80"/>
<area href="class_c_ipc_client.html" alt="CIpcClient" shape="rect" coords="0,112,96,136"/>
<area href="class_c_ipc_server.html" alt="CIpcServer" shape="rect" coords="106,112,202,136"/>
<area href="class_c_tcp_client.html" alt="CTcpClient" shape="rect" coords="212,112,308,136"/>
<area href="class_c_tcp_server.html" alt="CTcpServer" shape="rect" coords="318,112,414,136"/>
<area href="class_c_udp_client.html" title="udp服务类，用于连接发送功能 固删除接收对端地址的读写函数，若要接收对端地址信息的读写需使用UdpServer类" alt="CUdpClient" shape="rect" coords="424,112,520,136"/>
<area href="class_c_udp_server.html" title="udp服务类，用于连接发送功能 固删除无对端地址的读写函数，若要连接发送功能请使用CUdpClint功能类" alt="CUdpServer" shape="rect" coords="530,112,626,136"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a73a67d340b0d83df8c02834ec89edc2b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a73a67d340b0d83df8c02834ec89edc2b">CBasicService</a> ()</td></tr>
<tr class="memdesc:a73a67d340b0d83df8c02834ec89edc2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个服务基类对象  <a href="class_c_basic_service.html#a73a67d340b0d83df8c02834ec89edc2b">更多...</a><br /></td></tr>
<tr class="separator:a73a67d340b0d83df8c02834ec89edc2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a772031ad3c140a387b8b1e4f7bc4bed5"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a772031ad3c140a387b8b1e4f7bc4bed5">~CBasicService</a> ()</td></tr>
<tr class="memdesc:a772031ad3c140a387b8b1e4f7bc4bed5"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁一个服务基类对象  <a href="class_c_basic_service.html#a772031ad3c140a387b8b1e4f7bc4bed5">更多...</a><br /></td></tr>
<tr class="separator:a772031ad3c140a387b8b1e4f7bc4bed5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a222fc33e3f8c202533a635effc639a42"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_c_io_port_service.html">CIoPortService</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a222fc33e3f8c202533a635effc639a42">GetIoPortService</a> ()=0</td></tr>
<tr class="memdesc:a222fc33e3f8c202533a635effc639a42"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取底层的设备服务类  <a href="class_c_basic_service.html#a222fc33e3f8c202533a635effc639a42">更多...</a><br /></td></tr>
<tr class="separator:a222fc33e3f8c202533a635effc639a42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10f49182ac18d619be9d5aefe9557413"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_c_sock_error.html">CSockError</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a10f49182ac18d619be9d5aefe9557413">Init</a> (<a class="el" href="class_c_socket.html">CSocket</a> &amp;sock, bool isServer=false)=0</td></tr>
<tr class="memdesc:a10f49182ac18d619be9d5aefe9557413"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化服务类函数  <a href="class_c_basic_service.html#a10f49182ac18d619be9d5aefe9557413">更多...</a><br /></td></tr>
<tr class="separator:a10f49182ac18d619be9d5aefe9557413"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26d8f3995a64c9539b006a36e63ed97c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_c_sock_error.html">CSockError</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a26d8f3995a64c9539b006a36e63ed97c">Init</a> (const char *name)=0</td></tr>
<tr class="memdesc:a26d8f3995a64c9539b006a36e63ed97c"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化服务类函数  <a href="class_c_basic_service.html#a26d8f3995a64c9539b006a36e63ed97c">更多...</a><br /></td></tr>
<tr class="separator:a26d8f3995a64c9539b006a36e63ed97c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5b289830e25be913e20bd0b596d53f3"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#ae5b289830e25be913e20bd0b596d53f3">Run_One</a> ()=0</td></tr>
<tr class="memdesc:ae5b289830e25be913e20bd0b596d53f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行设备服务循环一次  <a href="class_c_basic_service.html#ae5b289830e25be913e20bd0b596d53f3">更多...</a><br /></td></tr>
<tr class="separator:ae5b289830e25be913e20bd0b596d53f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91890f13733f60c53ef31024aa282fbb"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a91890f13733f60c53ef31024aa282fbb">Run</a> ()=0</td></tr>
<tr class="memdesc:a91890f13733f60c53ef31024aa282fbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行服务  <a href="class_c_basic_service.html#a91890f13733f60c53ef31024aa282fbb">更多...</a><br /></td></tr>
<tr class="separator:a91890f13733f60c53ef31024aa282fbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf2dc523207064b2082b9e0791f5e88d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#acf2dc523207064b2082b9e0791f5e88d">NotifyStop</a> ()=0</td></tr>
<tr class="memdesc:acf2dc523207064b2082b9e0791f5e88d"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知退出  <a href="class_c_basic_service.html#acf2dc523207064b2082b9e0791f5e88d">更多...</a><br /></td></tr>
<tr class="separator:acf2dc523207064b2082b9e0791f5e88d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa73a529376ac948b2328a8656fbddc9a"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#aa73a529376ac948b2328a8656fbddc9a">IsStop</a> () const =0</td></tr>
<tr class="memdesc:aa73a529376ac948b2328a8656fbddc9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断Run函数是否退出  <a href="class_c_basic_service.html#aa73a529376ac948b2328a8656fbddc9a">更多...</a><br /></td></tr>
<tr class="separator:aa73a529376ac948b2328a8656fbddc9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a026feeca4952b0bd153af40f3d472b2f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a026feeca4952b0bd153af40f3d472b2f">WaitServerStop</a> ()=0</td></tr>
<tr class="memdesc:a026feeca4952b0bd153af40f3d472b2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知并等待Run函数的退出  <a href="class_c_basic_service.html#a026feeca4952b0bd153af40f3d472b2f">更多...</a><br /></td></tr>
<tr class="separator:a026feeca4952b0bd153af40f3d472b2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a84db55709c4a577a12879202e2788727"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a84db55709c4a577a12879202e2788727">DelTimer</a> (<a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;timer)=0</td></tr>
<tr class="separator:a84db55709c4a577a12879202e2788727"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab87e91381edc59c3118e3cfc89f82f76"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#ab87e91381edc59c3118e3cfc89f82f76">UpdateTimer</a> (<a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;timer)=0</td></tr>
<tr class="separator:ab87e91381edc59c3118e3cfc89f82f76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a697834720e8fea776f366a8207087fa6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#a697834720e8fea776f366a8207087fa6">SetTimer</a> (<a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;timer)=0</td></tr>
<tr class="separator:a697834720e8fea776f366a8207087fa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:ad69fde77d0a7508b7c52068d52aab039"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#ad69fde77d0a7508b7c52068d52aab039">delete_class_copy_operator</a> (<a class="el" href="class_c_basic_service.html">CBasicService</a>)</td></tr>
<tr class="separator:ad69fde77d0a7508b7c52068d52aab039"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
友元</h2></td></tr>
<tr class="memitem:acebacef617f17f086ec1f7a7f09de2f5"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_basic_service.html#acebacef617f17f086ec1f7a7f09de2f5">CTimerBase</a></td></tr>
<tr class="separator:acebacef617f17f086ec1f7a7f09de2f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>服务类 基类 </p>

<p class="definition">在文件 <a class="el" href="_service_base_8h_source.html">ServiceBase.h</a> 第 <a class="el" href="_service_base_8h_source.html#l00015">15</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a73a67d340b0d83df8c02834ec89edc2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73a67d340b0d83df8c02834ec89edc2b">&#9670;&nbsp;</a></span>CBasicService()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CBasicService::CBasicService </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造一个服务基类对象 </p>

<p class="definition">在文件 <a class="el" href="_service_base_8h_source.html">ServiceBase.h</a> 第 <a class="el" href="_service_base_8h_source.html#l00020">20</a> 行定义.</p>

</div>
</div>
<a id="a772031ad3c140a387b8b1e4f7bc4bed5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a772031ad3c140a387b8b1e4f7bc4bed5">&#9670;&nbsp;</a></span>~CBasicService()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CBasicService::~CBasicService </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>销毁一个服务基类对象 </p>

<p class="definition">在文件 <a class="el" href="_service_base_8h_source.html">ServiceBase.h</a> 第 <a class="el" href="_service_base_8h_source.html#l00023">23</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ad69fde77d0a7508b7c52068d52aab039"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad69fde77d0a7508b7c52068d52aab039">&#9670;&nbsp;</a></span>delete_class_copy_operator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CBasicService::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_basic_service.html">CBasicService</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a84db55709c4a577a12879202e2788727"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84db55709c4a577a12879202e2788727">&#9670;&nbsp;</a></span>DelTimer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CBasicService::DelTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;&#160;</td>
          <td class="paramname"><em>timer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在 <a class="el" href="class_c_tcp_base.html#a1bf84f93a8e116fb10e52c5964def747">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#a14a97c2f7a8c0b4421cf81503b071d31">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a067d66da4f1b413903e1c4da964dcf16">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#a3d9e530435ed02902e0ffc49ee911d23">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#aada20aa84fdb5b7983b89fa4f18b63df">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#a0b0a5150e15cc9e013711a5d30682554">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a18883092a65b385806b3cb3552f56f38">CUdpServer</a>, <a class="el" href="class_c_ipc_client.html#a483a3460364f7ffbed1bbf7cc2eb26e3">CIpcClient</a> , 以及 <a class="el" href="class_c_ipc_server.html#a2f68d998b1e4b755441ea2c6d1eab68b">CIpcServer</a> 内被实现.</p>

</div>
</div>
<a id="a222fc33e3f8c202533a635effc639a42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a222fc33e3f8c202533a635effc639a42">&#9670;&nbsp;</a></span>GetIoPortService()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_c_io_port_service.html">CIoPortService</a>* CBasicService::GetIoPortService </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取底层的设备服务类 </p>

<p>在 <a class="el" href="class_c_tcp_base.html#aeb2e16b0d02441ed501f91cf7343a425">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#af6768c0abfb54cce387c6b353b5e9dd0">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a27cae150a0f3f6b2d3f6a600a35d3e0b">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#a43511d2bc36455ebe70267794d8f05a1">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#ab0da6a1f850abeb24aa3ef691a1dd8c1">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#a6c80d142ee7839f90b220bddd5e0c734">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a2ebcef4f1740e51441e89af47f89d2e5">CUdpServer</a>, <a class="el" href="class_c_ipc_server.html#aec573dd038c82993f08ee14648d5f01e">CIpcServer</a> , 以及 <a class="el" href="class_c_ipc_client.html#a1a9fa6781912f4c5499fef2bea5bc73c">CIpcClient</a> 内被实现.</p>

</div>
</div>
<a id="a26d8f3995a64c9539b006a36e63ed97c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26d8f3995a64c9539b006a36e63ed97c">&#9670;&nbsp;</a></span>Init() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_c_sock_error.html">CSockError</a> CBasicService::Init </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化服务类函数 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回CSockError::SUCC 失败返回相应的错误信息 </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>ipc(进程间通信)服务类使用此初始化函数，详细参见每个类函数说明 </dd></dl>

<p>在 <a class="el" href="class_c_ipc_base.html#ac52a23a4bf71ef868a28297c5cdce72f">CIpcBase</a>, <a class="el" href="class_c_ipc_server.html#a98dd72100abc97f8c8ae5f4641e18587">CIpcServer</a>, <a class="el" href="class_c_ipc_client.html#ab4efe50b819ad2860585f11107054b23">CIpcClient</a>, <a class="el" href="class_c_tcp_base.html#a2d93239337c263cfb0ad043a5672e7da">CTcpBase</a> , 以及 <a class="el" href="class_c_udp_base.html#a4f67f613a4d8e20ee122a21eb0006dfa">CUdpBase</a> 内被实现.</p>

</div>
</div>
<a id="a10f49182ac18d619be9d5aefe9557413"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10f49182ac18d619be9d5aefe9557413">&#9670;&nbsp;</a></span>Init() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_c_sock_error.html">CSockError</a> CBasicService::Init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_socket.html">CSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isServer</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化服务类函数 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回CSockError::SUCC 失败返回相应的错误信息 </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>udp/tcp服务类使用此初始化函数，详细参见每个类函数说明 </dd></dl>

<p>在 <a class="el" href="class_c_tcp_base.html#a01055364ad09fc55a53ec122275c318e">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#a615adef818eec9c6465fe5c7ff68ea3d">CUdpBase</a>, <a class="el" href="class_c_tcp_client.html#a9ed08affa5b7292535374a40bdb3a74b">CTcpClient</a>, <a class="el" href="class_c_tcp_server.html#a91a5d49009e5996ab2193e53339f4c61">CTcpServer</a>, <a class="el" href="class_c_ipc_base.html#a5a5914d94853f219cf29fe2ac2f180bb">CIpcBase</a>, <a class="el" href="class_c_udp_server.html#a5862a7fd4ea7b754552eedc19cfdaa53">CUdpServer</a> , 以及 <a class="el" href="class_c_udp_client.html#aebf05411c8a2938f71b20faa002fbe2a">CUdpClient</a> 内被实现.</p>

</div>
</div>
<a id="aa73a529376ac948b2328a8656fbddc9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa73a529376ac948b2328a8656fbddc9a">&#9670;&nbsp;</a></span>IsStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CBasicService::IsStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断Run函数是否退出 </p>

<p>在 <a class="el" href="class_c_tcp_base.html#aa92560f70e6bf99579567d339e57ebbf">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#a1b617bf569035b349d5f9e3fa7c1062d">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#ad0342ce18d24de46f86c99261ed44f8e">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#a34e5408e88e0161b6a08807266302ce9">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#ae07f629e082ecacf27ff0c91fa808ea5">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#a39e3e8c1477e86e3a68fd89a11e7b217">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a8963defe56982aaff79417667d23da96">CUdpServer</a>, <a class="el" href="class_c_ipc_server.html#a9629de28739f75f42c63550081b19520">CIpcServer</a> , 以及 <a class="el" href="class_c_ipc_client.html#ab6159b8aed28625341c3e448d861d048">CIpcClient</a> 内被实现.</p>

</div>
</div>
<a id="acf2dc523207064b2082b9e0791f5e88d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf2dc523207064b2082b9e0791f5e88d">&#9670;&nbsp;</a></span>NotifyStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CBasicService::NotifyStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知退出 </p>

<p>在 <a class="el" href="class_c_tcp_base.html#aa10ef26a7837f0f80bfb5ce7dad8a7dc">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#a3278a0321a26d29983c080eebad9865e">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a8a4af718a839d201a17b4d76c6771877">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#ae943fc8a2eb1bc116a4bfa714ce88e53">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#aa018e3d31a656f08527d151120c27794">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#a7c1823ebf31c685fb4e182637bed9674">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a926f304c91aa6e0d66e7fe7f3189f5e6">CUdpServer</a>, <a class="el" href="class_c_ipc_server.html#ac62bb4a375227fe83a343e91c2851ee2">CIpcServer</a> , 以及 <a class="el" href="class_c_ipc_client.html#aea4ada8834273a4f73b6f52d4480fa43">CIpcClient</a> 内被实现.</p>

</div>
</div>
<a id="a91890f13733f60c53ef31024aa282fbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91890f13733f60c53ef31024aa282fbb">&#9670;&nbsp;</a></span>Run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CBasicService::Run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行服务 </p>

<p>在 <a class="el" href="class_c_tcp_base.html#a3c7f720161a1dcdb80d4bb8813b62ef9">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#ae9515a147896f2f4493407a03bb21c03">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a460752b53138378d7e150b8312232896">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#af863728c772ad57a28eda8b73e5a7313">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#a9d65087deb9bfea428ff3bb615ce9954">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#ab7826cd43a349d238404c1151ccf862f">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a094ecc90a9e5cd326a58928bf48ce08c">CUdpServer</a>, <a class="el" href="class_c_ipc_server.html#a33f88801a6fb30b8bfd9f0fdc063b77f">CIpcServer</a> , 以及 <a class="el" href="class_c_ipc_client.html#a4aceb44d62ec34fc5f1c009e0bccdfa4">CIpcClient</a> 内被实现.</p>

</div>
</div>
<a id="ae5b289830e25be913e20bd0b596d53f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5b289830e25be913e20bd0b596d53f3">&#9670;&nbsp;</a></span>Run_One()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CBasicService::Run_One </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行设备服务循环一次 </p>

<p>在 <a class="el" href="class_c_tcp_base.html#ad0f90a50ba640eb835eeb5fa4cc33070">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#abd8f00554bbd461ddc245a8dbc12342b">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a72e867483b13c9e3a046220994a914b7">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#af28974b451b2af615c6ba3882b2b35c7">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#a23979cafab8a95298ec8c248e62c426c">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#ad7fbfb3f6993fa9a7aa22a79911b4a4c">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#aed8baba7d9895b6895d9624ee8cb1bf4">CUdpServer</a>, <a class="el" href="class_c_ipc_server.html#ae56ad501c3bf4a84f756b6bf98e8865e">CIpcServer</a> , 以及 <a class="el" href="class_c_ipc_client.html#a6166558bd04d81fd675f324e3d95aa45">CIpcClient</a> 内被实现.</p>

</div>
</div>
<a id="a697834720e8fea776f366a8207087fa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a697834720e8fea776f366a8207087fa6">&#9670;&nbsp;</a></span>SetTimer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CBasicService::SetTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;&#160;</td>
          <td class="paramname"><em>timer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在 <a class="el" href="class_c_tcp_base.html#a0327d3f24e578a54413fa6749e735a97">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#a2f978d31627d822f09a185a3f1be5b77">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a91e0f3a46b25f2d5fb3a635c5095a0e3">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#a6656ac1f6545de42e7d26d86c02f117f">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#a7fc951a885bc9d3aab6ecdf0d1aa9273">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#a67bf3b522a162ab9c3258dd70529d15a">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#aeb3e2cc49ab20aeaf396c40e28f58627">CUdpServer</a>, <a class="el" href="class_c_ipc_client.html#aa0a17ceab18bf4e0b4a98f4c6ab8b38d">CIpcClient</a> , 以及 <a class="el" href="class_c_ipc_server.html#a31bc1a0fb9e64d32cb57f27a088c8a5b">CIpcServer</a> 内被实现.</p>

</div>
</div>
<a id="ab87e91381edc59c3118e3cfc89f82f76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab87e91381edc59c3118e3cfc89f82f76">&#9670;&nbsp;</a></span>UpdateTimer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CBasicService::UpdateTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;&#160;</td>
          <td class="paramname"><em>timer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在 <a class="el" href="class_c_tcp_base.html#a6b036e6967191efe0f329b07ca8207e3">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#a63759990d87d12f87c1950290b54e8ee">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#afb7b94ece1b0621c027cceb46081262e">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#a1e9571f43f1e91576211b2dd0e4737c9">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#a81bcb7d38ad17b9bc6ee13677ab7e287">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#a31b5520b10b25a2b502cb79eb6731cae">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a007ed280c7fb7066bc957425e7dc746b">CUdpServer</a>, <a class="el" href="class_c_ipc_client.html#a2e3d9dbe75406e4990ad44202d64d447">CIpcClient</a> , 以及 <a class="el" href="class_c_ipc_server.html#a31a7557064b9a15ecf29f208528cf63f">CIpcServer</a> 内被实现.</p>

</div>
</div>
<a id="a026feeca4952b0bd153af40f3d472b2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a026feeca4952b0bd153af40f3d472b2f">&#9670;&nbsp;</a></span>WaitServerStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CBasicService::WaitServerStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知并等待Run函数的退出 </p>
<dl class="section remark"><dt>备注</dt><dd>注意此函数将会清空未完成的io队列请求 </dd></dl>

<p>在 <a class="el" href="class_c_tcp_base.html#a2a83474a64a6998f0fed855b70f9cf6b">CTcpBase</a>, <a class="el" href="class_c_udp_base.html#abc3649c6c9856818532e9c2b47b16381">CUdpBase</a>, <a class="el" href="class_c_ipc_base.html#a96dec13698548235d67bd5d02863a4e0">CIpcBase</a>, <a class="el" href="class_c_tcp_server.html#a5e63118cf3e1b653812c6a0b26db979a">CTcpServer</a>, <a class="el" href="class_c_udp_client.html#aa9ed7c2a6ef85dcbba25056ff6777363">CUdpClient</a>, <a class="el" href="class_c_tcp_client.html#aa3035e0a39e135dd8f370483545c3e3f">CTcpClient</a>, <a class="el" href="class_c_udp_server.html#a2242ee6ccbb71fa768ba191c8a61f9a2">CUdpServer</a>, <a class="el" href="class_c_ipc_server.html#a0101ecf81b0384a2f6180441890d9140">CIpcServer</a> , 以及 <a class="el" href="class_c_ipc_client.html#aef6a41324050cd76426d2b82d80a93d0">CIpcClient</a> 内被实现.</p>

</div>
</div>
<h2 class="groupheader">友元及相关函数文档</h2>
<a id="acebacef617f17f086ec1f7a7f09de2f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acebacef617f17f086ec1f7a7f09de2f5">&#9670;&nbsp;</a></span>CTimerBase</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="class_c_timer_base.html">CTimerBase</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_service_base_8h_source.html">ServiceBase.h</a> 第 <a class="el" href="_service_base_8h_source.html#l00063">63</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/socket/<a class="el" href="_service_base_8h_source.html">ServiceBase.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
